import java.util.Scanner;

/**
 * This is a program use <code>break</code> <code>continue</code>
 */


public class BreakContinue {
    public static void main(String[] args) {

        for (int i = 0; i < 10; i++) {
            if (i % 2 ==0) continue;
            System.out.println("i=" +i);
        }

        for (int i = 0; i < 10; i++) {
            System.out.println("Fj="+i);
            if(i %2 ==0) break;
            System.out.println("j=" +i);
        }

        int sum = 0;
        int goal= 10;
        Scanner in = new Scanner(System.in);
        // 这里只会执行满足条件。
        while(sum < goal){
            System.out.println("请输入你的key");
            int n = in.nextInt();
            sum += n;
            System.out.println("当前的宿命sum为"+sum);
        }
        // 上面的while语句执行完， 才会执行这个。
        System.out.println("游戏结束！");
    }
}
